<template>
  <div>
    支付中....若已支付请返回刷新页面
  </div>
</template>

<script lang="ts" setup>
import { useRoute } from 'vue-router';
import axios from 'axios';

const route = useRoute();
const traceNo = route.params.traceNo as string;

const initPayment = async () => {
  try {
    await axios.get(`http://localhost:8081/alipay/pay?traceNo=${traceNo}`);
  } catch (error) {
    console.error('支付请求出错:', error);
  }
};

initPayment();
</script>
